<?

class Association extends objectClass {
	function Association ($ClefEtrangere,$Module,$nomObj,$Driver) {
		$this->driver = $Driver;
		$this->nomObj = $nomObj;
		$this->titre=$ClefEtrangere["Table"];
		$this->Module = $Module;
		$this->Prefix=MAIN_DB_PREFIX.$Module."-";
		$this->initNCard($ClefEtrangere);
	}

	function Check(){
		echo "<li>ASSOCIATION ".$this->titre."</li>";
		eval($this->driver."::createData();");
	}

	function initNCard($ClefEtrangere) {
		/*		if ($ClefEtrangere["Reference"]){
			print_r($ClefEtrangere);
			$this->Etrangeres[$this->nomObj]['card']= '1,1';
			$this->Etrangeres[$this->nomObj]['data']= $this->nomObj.',Id';
			$this->Proprietes['Query']['type']= 'varchar';
			$this->Proprietes['Query']['length']= '255';
			$this->Proprietes['Query']['titre']= 'Query';
			print_r($this);
			}else{*/
		$temp = explode (',',$ClefEtrangere['data']);
		$this->Etrangeres[$this->nomObj]['card']= '1,1';
		$this->Etrangeres[$this->nomObj]['data']= $this->nomObj.',Id';
		$this->Etrangeres[$temp[0].'Id']['card']= '1,1';
		$this->Etrangeres[$temp[0].'Id']['data']= $temp[0].',Id';
		// 		}
	}
}
?>